<template>
  <div class="cartAddressWrapper">
    <div class="cart-address-box">
      <div class="selectAddress" v-if='!addressStatus'>
        <p><img src="http://static.52letsgo.cn/zz/wechatimg/ic_cart_add.png" alt="">请选择收货地址</p>
      </div>
      <div v-if='addressStatus'>
        <div class="address-info">
          <div class="address-item address-name">
            <img src="http://static.52letsgo.cn/zz/wechatimg/ic_cart_name.png" alt="">
            <p>{{addressData.consignee}}</p>
          </div>
          <div class="address-item address-phone">
            <img src="http://static.52letsgo.cn/zz/wechatimg/ic_cart_mobile.png" alt="">
            <p>{{addressData.phone}}</p>
          </div>
        </div>
        <div class="address-item address-detail">
          <img src="http://static.52letsgo.cn/zz/wechatimg/ic_cart_address.png" alt="">
          <p>{{addressData.address}}</p>
        </div>
      </div>
    </div>
    <img class="cart-line" src="http://static.52letsgo.cn/zz/wechatimg/bg_cart_line.png"  alt="">
  </div>
</template>
<script>
  export default {
    data () {
      return {
        addressStatus: false
      }
    },
    props: {
      addressData: Object
    },
    created: function () {
      console.log(this.addressData)
      if(this.addressData.id) {
        this.addressStatus = true
      }
    }
  }
</script>
